Rename the gtk-key-bindings property
authorMatthias Clasen <mclasen@redhat.com>
Sat, 21 Nov 2015 01:34:03 +0000 (20:34 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 21 Nov 2015 01:35:39 +0000 (20:35 -0500)
This is not a standard CSS property, so rename it to
-gtk-key-bindings. We still support the old name, with a
deprecation warning.

gtk/gtkbindings.c
gtk/gtkcssstylepropertyimpl.c

index 2a1ec437f0f2356f1a87de85ce7baa028752bf55..2edfec0c0cd083c064ffc1cf6c6f5074c2839452 100644 (file)
@@ -1445,7 +1445,7 @@ gtk_bindings_activate_list (GObject  *object,
   state = gtk_widget_get_state_flags (GTK_WIDGET (object));
 
   gtk_style_context_get (context, state,
-                         "gtk-key-bindings", &array,
+                         "-gtk-key-bindings", &array,
                          NULL);
   if (array)
     {
index 793c6d9d07d908f0a3a6facc0516d157042afa33..c42ff5d1d816cdf201829067fde848c4f8bfa42b 100644 (file)
@@ -1743,7 +1743,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 G_GNUC_END_IGNORE_DEPRECATIONS
 
   /* Private property holding the binding sets */
-  gtk_css_style_property_register        ("gtk-key-bindings",
+  gtk_css_style_property_register        ("-gtk-key-bindings",
                                           GTK_CSS_PROPERTY_GTK_KEY_BINDINGS,
                                           G_TYPE_PTR_ARRAY,
                                           0,
@@ -1752,5 +1752,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS
                                           bindings_value_query,
                                           bindings_value_assign,
                                           _gtk_css_array_value_new (_gtk_css_string_value_new (NULL)));
+  _gtk_style_property_add_alias ("-gtk-key-bindings", "gtk-key-bindings");
 }